<?php

namespace Home\Model;

use Think\Model;

class ShippingModel extends Model {
    //获取店铺的配送方式
    function get_list($store_id=0) {
        $shipping_list=array();
        $shipping_list_=$this->where('enabled=1 AND store_id=' . $store_id)->order('sort_order asc')->select();
        foreach($shipping_list_ as $key => $val){
            $shipping_list_[$key]['cod_regions_price']= unserialize($val['cod_regions_price']);
            $shipping_list_[$key]['cod_regions']= unserialize($val['cod_regions']);
            $shipping_list[$val['shipping_id']]=$shipping_list_[$key];
        }
        return $shipping_list;
    }
}

?>
